﻿/*include:js\declare*/
//鼠标覆盖图片修改	<div mouseimage="{OverSrc:'over.jpg',OutSrc:'out.jpg'}" id="XXX"></div>
(function(){
var MouseImage=function()
	{
	this.GetArgument(arguments[0],{Id:null,Event:null,OverSrc:null,OutSrc:null});
	this.Start(this.Event||{IsGetOnly:1});
	};
(fastCSharp.Functions.MouseImage=MouseImage).Inherit(fastCSharp.BaseFunction,{
Start:function(Event)
	{
	if(!Event.IsGetOnly)
		{
		var Element=fastCSharp.$Id(this.Id),Input=Element.Element();
		if(Input!=this.Element)
			{
			this.Element=Input;
			Element.AddEvent('mouseout',fastCSharp.ThisEvent(this,this.Out));
			}
		Element.Set('src',this.OverSrc);
		}
	},
Out:function(Event)
	{
	fastCSharp.$Id(this.Id).Set('src',this.OutSrc);
	}
		});
new fastCSharp.Declare('MouseImage','mouseover','AttributeName');
})();